<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	<canvas id="canvas" width="500" height="500" style="border: 1px solid #ccc"></canvas>

</body>
</html>

<script type="text/javascript">
	var canvas = document.getElementById('canvas');
	var context = canvas.getContext('2d');
	var gr = context.createRadialGradient(400,50,50,400,50,400);
	gr.addColorStop(0.1,'rgb(255,255,0');
	gr.addColorStop(0.3,'rgb(255,0,255')
	gr.addColorStop(1,'rgb(0,255,255');
	context.fillStyle =gr;
	context.fillRect(0,0,500,500)
</script>